package com.seven;

import com.seven.cache.CacheApi;
import com.seven.thread.RedisComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * @工程名:dtk-items-openapi
 * @作者: sevenDay
 * @时间: 2019/4/8 12:45
 * @描述:
 */
@Service("cacheApi")
public class SevenRedis implements CacheApi<String,Object> {
    @Autowired
    private RedisComponent redisComponent;


    @Override
    public Object get(String key) {
        return redisComponent.get(key);
    }

    @Override
    public Object put(String s, Object o, long l) {
       // public boolean set(String key,Object value,long time)
        return redisComponent.set(s,o,l);
    }

    @Override
    public boolean remove(String key, Object value) {
        return false;
    }
}
